<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>子页面</title>
  </head>
  <body>
    <button onclick="alertInParent()">点击打开窗口</button>
    <script>
      function alertInParent(params) {
        window.open(
          "https://www.163.com",
          "_parent",
          "width=800,height=500",
          true
        );
      }
    </script>
  </body>
</html>
